package top.lucky.kafka.utils;

import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.serialization.StringSerializer;

import java.util.Properties;

/**
 * @author Jane
 * @date 2022/12/25, 16:41
 */
public class PropertiesUtil  {
	public static Properties getProperties() {
		//配置
		Properties properties = new Properties();
		//连接集群
		properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,"http://localhost:9193,http://localhost:9194,http://localhost:9195");
		properties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
		properties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
		return properties;
	}
}
